package com.zby.test.util.common;

import org.apache.commons.lang3.StringUtils;

/**
 * Created By zby on 16:52 2019/1/23
 */

public class CommonUtil {

    /**
     * 判断不为空
     *
     * @param obj
     * @return
     */
    public static boolean isNotNull(Object obj) {
        if (obj instanceof String) {
            String str = (String) obj;
            return null != str && str.length() != 0;
        }
        return null != obj;
    }


    /**
     * 判断为空
     *
     * @param obj
     * @return
     */
    public static boolean isNull(Object obj) {
        if (obj instanceof String) {
            String str = (String) obj;
            return null == str || str.length() == 0;
        }
        return null == obj;
    }

}
